﻿<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>欢迎注册积木用户</title>
<script src="{$base_url}/static/js/jquery.js" type="text/javascript"></script>
<script src="{$base_url}/static/js/jquery.form.js" type="text/javascript"></script> 
<script src="{$base_url}/static/js/jquery.boxy.js" type="text/javascript"></script> 
<script src="{$base_url}/static/js/index.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="{$base_url}/static/css/register.css" />
<link rel="stylesheet" type="text/css" href="{$base_url}/static/css/boxy.css" />
<script type="text/javascript">
$(document).ready(function() { 
	$('#signup-submit').click(function() {

    var options = { 
        //target:        '#act',   // target element(s) to be updated with server response 
        //beforeSubmit:  showRequest,  // pre-submit callback 
        success:       showResponse, // post-submit callback  
        // other available options: 
        url:      '{$base_url}index.php/account/signup/reg',
        type:      'post',        // 'get' or 'post', override for form's 'method' attribute 
        //dataType:  null        // 'xml', 'script', or 'json' (expected server response type) 
        //clearForm: true        // clear all form fields after successful submit 
        //resetForm: true        // reset the form after successful submit 
 
        // $.ajax options can be used here too, for example: 
        //timeout:   3000 
    }; 
 

        $('#signup-form').ajaxSubmit(options); 
        return false; 
	});
	
	

}); 

// post-submit callback 
function showResponse(responseText, statusText, xhr, $form)  {  
	if(responseText!="success"){
		Boxy.alert(responseText, null, {
		title: "提示信息"
		});
        return false; 
     }else{
     window.location.href="{$base_url}index.php/account/";
     }
} 
</script>
<!--头部 开始-->
<div class="header">
<a href="{$base_url}/"><img src="{$base_url}/static/css/img/logo_account.png" alt="积木" border="0" class="logo2" title="积木"></a>
<span id="login">已有账号？ <a href="{$base_url}index.php/account/login">登录</a></span>
</div>
<div class="nav">
	<div class="nav_left"></div>
    <div class="nav_middle_wel"><span class="dis_none">欢迎注册积木用户</span></div>
    <div class="nav_right"></div>
</div>
<!--头部 结束-->
<!--主体 开始-->
<div class="main">
       <div class="main_top1"></div>
       <div class="sns_login">
           <ul>
               <li id="qq_login"><a href="{$base_url}/thirdpart/qq/" id="qq_login">用QQ帐号登录</a> </li>
               <li id="douban_login"><a href="{$base_url}/thirdpart/douban/" id="douban_login">用豆瓣帐号登录</a></li>
               <li id="weibo_login"><a href="{$base_url}/thirdpart/sina/" id="weibo_login">用微博帐号登录</a></li>        
           </ul>
       </div>
       <form id="signup-form" method="post" action="{$base_url}index.php/account/signup/reg" class="validator">
        	<ul class="main_form">
            	<li>
             		 <div class="fm_left"><span class="star"></span>&nbsp;邮箱：</div>
                     <div class="fm_right"> <input type="text" size="30" name="email" id="create-email" class="text" require="true" datatype="email|ajax" url="/ajax/validator.php" vname="signupemail" require="true" msg="邮箱格式错误，再检查一下"/></div>

                     <div class="hint clear" id="email_name_r_info">填写您常用的邮箱地址。</div>
                </li>
            	<li>
             		 <div class="fm_left"><span class="star"></span>&nbsp;密码：</div>
             		 <div class="fm_right"><input type="password" size="30" name="password" class="text" require="true" datatype="limit" min="6" id="signup-password" msg="密码格式错误，再检查一下"/>
             		 </div>
                     <div class="clear"></div>
                     <div class="hint clear" id="password_info">6到16个字符，区分大小写。</div>
                </li>
            	<li>
             		 <div class="fm_left"><span class="star"></span>&nbsp;确认密码：</div>
             		 <div class="fm_right"><input type="password" size="30" name="password2" class="text" require="true" datatype="compare" compare="signup-password" id="signup-password-confirm" msg="两次输入的密码好像不一样哦"/></div> 
                     <div class="clear"></div> 
                     <div class="hint clear" id="re_password_info">再次输入你设置的密码。</div>

                </li> 
            	<li>
             		 <div class="fm_left"><span class="star"></span>&nbsp;名称：</div>
                     <div class="fm_right">
                     <input type="text" size="30" name="username" id="signup-username" class="text" value=""  datatype="enandcn|ajax" url="/ajax/validator.php" vname="nickname" require="true" msg="名称格式错误，再检查一下|这个名字已经有人用了哦，换一个试试"/></div>
                     <div class="clear"></div> 
                     <div class="hint clear" id="usercheckcode_info">个人请填写姓名，网站或团体请填写网站名或团队名称</div>					 
                </li> 
            	<li>
             		 <div class="fm_left">&nbsp;</div>
                     <div class="fm_right"><input type="checkbox" name="agree" id="agree" value="Y" checked="checked" require="true"> 我同意<a href="http://jimudonation.com/about/terms" target="_blank">服务条款</a>
                     </div>
                </li>
             	<li>
             		 <div class="fm_left">&nbsp;</div>
                     <div class="fm_right"><div class="act">
    <input type="button" value="免费注册" name="commit" id="signup-submit" class="free-signup-button"  /></div>
                </li>
           </ul>
        </form>
 	<div class="main_bottom"></div> 
</div>

<!--主体 结束-->
</div>

<!--footer 开始-->
{include file="common/footer.html"}
<!--footer 结束-->
</body>
</html>